In a tutorial, I found this code:
const session = require('express-session');
const MongoStore = require('connect-mongo')(session);
What does the (session) do after the require statement? Is it a kind of parameter for the const MongoStore? I do not understand the "mechanism" here. Thank you very much in advance for some clarification!
Also, there is an error telling me that I am supposed to use a new statement with MongoStore. However, the code in the video tutorial is working fine. Is this error maybe due to changes in a more recent version of the "mongo connect" module?